/*
 * Configuration for Xilinx ZynqMP Flash utility
 *
 * (C) Copyright 2014 - 2015 Xilinx, Inc.
 * Michal Simek <michal.simek@xilinx.com>
 * Siva Durga Prasad Paladugu <sivadur@xilinx.com>
 *
 * Based on Configuration for Versatile Express
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#ifndef __CONFIG_ZYNQMP_MINI_H
#define __CONFIG_ZYNQMP_MINI_H

#define CONFIG_SYS_NO_FLASH
#define _CONFIG_CMD_DEFAULT_H
/* #define CONFIG_SYS_DCACHE_OFF */
#define CONFIG_SYS_ICACHE_OFF
#define CONFIG_FIT_DISABLE_SHA256

#include <configs/xilinx_zynqmp.h>

/* Undef unneeded configs */
#undef CONFIG_EXTRA_ENV_SETTINGS
#undef CONFIG_BOARD_LATE_INIT
#undef CONFIG_CMD_BOOTZ
#undef CONFIG_BOOTCOMMAND
#undef CONFIG_SYS_HUSH_PARSER
#undef CONFIG_SYS_PROMPT_HUSH_PS2
#undef CONFIG_BOOTDELAY
#undef CONFIG_PREBOOT
#undef CONFIG_SYS_MALLOC_LEN
#undef CONFIG_ENV_SIZE
#undef CONFIG_CMDLINE_EDITING
#undef CONFIG_AUTO_COMPLETE
#undef CONFIG_ZLIB
#undef CONFIG_GZIP
#undef CONFIG_CMD_SPL
#undef CONFIG_CMD_ENV
#undef CONFIG_CMD_EXT2
#undef CONFIG_CMD_EXT4
#undef CONFIG_CMD_FAT
#undef CONFIG_CMD_FS_GENERIC
#undef CONFIG_CMD_MEMORY
#undef CONFIG_DOS_PARTITION
#undef CONFIG_CMD_ELF
#undef CONFIG_MP
#undef CONFIG_SYS_MEMTEST_START
#undef CONFIG_SYS_MEMTEST_END
#undef CONFIG_SYS_INIT_SP_ADDR
#undef CONFIG_SYS_LONGHELP
#undef CONFIG_CMD_CACHE
#undef CONFIG_FPGA_ZYNQMPPL
#undef CONFIG_FPGA_XILINX
#undef CONFIG_FPGA
#undef CONFIG_CMD_SF_TEST
#undef CONFIG_CMD_GPIO
#undef CONFIG_CMD_SPI
#undef CONFIG_FIT_VERBOSE
#undef CONFIG_ZYNQ_SERIAL
#undef CONFIG_CMD_MII

/* BOOTP options */
#undef CONFIG_BOOTP_BOOTFILESIZE
#undef CONFIG_BOOTP_BOOTPATH
#undef CONFIG_BOOTP_GATEWAY
#undef CONFIG_BOOTP_HOSTNAME
#undef CONFIG_BOOTP_MAY_FAIL
#undef CONFIG_BOOTP_PXE
#undef CONFIG_CMD_BOOTI
#undef CONFIG_CMD_UNZIP

/* PXE */
#undef CONFIG_CMD_PXE
#undef CONFIG_MENU

/* Define needed configs */
#define CONFIG_CMD_MEMORY
#define CONFIG_BOOTDELAY	-1 /* -1 to Disable autoboot */

#undef CONFIG_NR_DRAM_BANKS
#define CONFIG_NR_DRAM_BANKS	1

#if defined(CONFIG_MINI_QSPI)
# define CONFIG_SYS_SDRAM_SIZE		(256 * 1024)
# define CONFIG_SYS_SDRAM_BASE		0xFFFC0000
# define CONFIG_ENV_SIZE		1400
# define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_SDRAM_BASE + 0x20000)
# define CONFIG_SYS_MALLOC_LEN		0x2000

#elif defined(CONFIG_MINI_NAND)
# define CONFIG_SYS_SDRAM_SIZE		0x1000000
# define CONFIG_SYS_SDRAM_BASE		0
# define CONFIG_ENV_SIZE		0x10000
# define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_SDRAM_BASE + 0x40000)
# define CONFIG_SYS_MALLOC_LEN		0x800000

#elif defined(CONFIG_MINI_EMMC)
# define CONFIG_ENV_SIZE		0x10000
# define CONFIG_SYS_INIT_SP_ADDR	CONFIG_SYS_TEXT_BASE
# define CONFIG_SYS_MALLOC_LEN		0x800000
# define CONFIG_DOS_PARTITION
# define CONFIG_SYS_LONGHELP
# define CONFIG_CMD_FAT
# define CONFIG_CMD_FS_GENERIC
#endif

#endif /* __CONFIG_ZYNQMP_MINI_H */
